/**
 * 路由封装
 * @author likai
 * 
*/

import Vue from "vue";
import Router from "vue-router";

Vue.use(Router)

// 路由集合
const router = new Router({
    // 去掉域名后面的#
    mode: 'history',
    routes: [
        {path: "/", redirect: "/login"},
        {
            path: "/login", 
            component: ()=> import("@/views/Login.vue")
        },
        {
            path: "/home",
            component: ()=> import("@/views/Home.vue"),
            redirect: '/welcome',
            children:[
                {
                    path: '/welcome',
                    component: ()=> import("@/views/Welcome.vue")
                }
            ]
        }
    ]
})

export default router